<?xml version="1.0" encoding="windows-1251"?>
<Root Caption="Отчет" Params="CcguiCurrReportEditor" Position="CcSmetaReportPosition" Report="CcLSReport" Error="CcShowErrorReport">
  <Descript Position="CcSmetaReportPosition">
    <Builder Base="CcDBRTFReportBuilder" User="CcDBExcelReportBuilder" Formula="1">
      <Node Code="CcDBRTFReportBuilder" Name="в RTF"/>
      <Node Code="CcDBExcelReportBuilder" Name="в Excel" Formula="1"/>
    </Builder>
    <Page Name="Основные" Class="CcguiReportBaseDescript" Size="0" State="1" MarginLeft="1" MarginRight="1" MarginTop="1" MarginBottom="1" MarginHeadery="1" MarginFootery="1" Orientation="1" StartPageNum="1">
      <UserValues Size="" State="" MarginLeft="" MarginRight="" MarginTop="" MarginBottom="" MarginHeadery="" MarginFootery="" Orientation="" StartPageNum=""/>
    </Page>
    <Columns Name="Колонки" Class="CcguiReportColumnsDescript">
      <Node Code="Col1" Name="Колонка 1" Width="2" Type="0" Visible="1">
        <UserValues Type="" Width=""/>
      </Node>
      <Node Code="Col2" Width="2" Type="0" Visible="1">
        <UserValues Type="" Width="" Visible=""/>
      </Node>
      <Node Code="Col3" Width="2" Type="0" Visible="1">
        <UserValues Type="" Width="" Visible=""/>
      </Node>
      <Node Code="Col4" Width="2" Type="0" Visible="1">
        <UserValues Type="" Width="" Visible=""/>
      </Node>
      <Node Code="Col5" Width="2" Type="0" Visible="1">
        <UserValues Type="" Width="" Visible=""/>
      </Node>
      <Node Code="Col6" Width="2" Type="0" Visible="1">
        <UserValues Type="" Width="" Visible=""/>
      </Node>
      <Node Code="Col7" Width="2" Type="0" Visible="1">
        <UserValues Type="" Width="" Visible=""/>
      </Node>
      <Node Code="Col8" Width="2" Type="0" Visible="1">
        <UserValues Type="" Width="" Visible=""/>
      </Node>
      <Node Code="Col9" Width="2" Type="0" Visible="1">
        <UserValues Type="" Width="" Visible=""/>
      </Node>
      <Node Code="Col10" Width="2" Type="0" Visible="1">
        <UserValues Type="" Width="" Visible=""/>
      </Node>
      <Node Code="Col11" Width="2" Type="0" Visible="1">
        <UserValues Type="" Width="" Visible=""/>
      </Node>
      <Node Code="Col12" Width="2" Type="0" Visible="1">
        <UserValues Type="" Width="" Visible=""/>
      </Node>
      <Node Code="Col13" Width="2" Type="0" Visible="1">
        <UserValues Type="" Width="" Visible=""/>
      </Node>
      <Node Code="Col14" Width="2" Type="0" Visible="1">
        <UserValues Type="" Width="" Visible=""/>
      </Node>
      <Node Code="Col15" Width="2" Type="0" Visible="1">
        <UserValues Type="" Width="" Visible=""/>
      </Node>
      <Node Code="Col16" Width="2" Type="0" Visible="1">
        <UserValues Type="" Width="" Visible=""/>
      </Node>
      <Node Code="Col17" Width="2" Type="0" Visible="1">
        <UserValues Type="" Width="" Visible=""/>
      </Node>
      <Node Code="Col18" Width="2" Type="0" Visible="1">
        <UserValues Type="" Width="" Visible=""/>
      </Node>
    </Columns>
    <Styles Name="Шрифты" Class="CcguiReportStylesDescript">
      <Node Code="Subscript" Name="Подстрочник" FontName="Verdana" FontSize="7" FontStyle="0"/>
      <Node Name="Основной шрифт" FontName="Verdana" FontSize="8" FontStyle="0">
        <UserValues FontName="" FontSize="" FontStyle=""/>
      </Node>
      <Node Code="DocName" Name="Наименование документа" FontName="Verdana" FontSize="12" FontStyle="1">
        <UserValues FontName="" FontSize="" FontStyle=""/>
      </Node>
      <Node Code="DocNote" Name="Примечание к наименованию документа" FontName="Verdana" FontSize="10" FontStyle="1">
        <UserValues FontName="" FontSize="" FontStyle=""/>
      </Node>
      <Node Code="SysData" FontName="Verdana" FontSize="8" FontStyle="32" Name="Системная информация" FontColor="12961221">
        <UserValues FontName="" FontSize="" FontStyle=""/>
      </Node>
      <Node Code="Header" FontName="Verdana" FontSize="8" FontStyle="1" Name="Заголовок">
        <UserValues FontName="" FontSize="" FontStyle=""/>
      </Node>
    </Styles>
    <Borders Name="Границы" Class="CcguiReportBordersDescript">
      <Node Code="None" Name="Нет границ" Type="0"/>
      <Node Code="All" Name="Все границы" Type="0" State="256"/>
      <Node Code="Around" Name="Границы вокруг" State="128"/>
      <Node Code="Subscript" Name="Подстрочник" Type="2" State="8"/>
      <Node Code="TableHeader" Name="Заголовок таблицы" Type="0" State="256"/>
      <Node Code="TableDelimiter" Name="Разделять позиции таблицы" Type="0" State="256">
        <UserValues State=""/>
      </Node>
      <Node Code="TableBody" Name="Разделительные линии таблицы" Type="1" State="96">
        <UserValues State=""/>
      </Node>
    </Borders>
    <Alignments Name="Выравнивание" Class="CcguiReportAlignDescript">
      <Node Code="Left" Name="Влево" Vert="0" Horz="0"/>
      <Node Code="Right" Name="Вправо" Vert="0" Horz="1"/>
      <Node Code="Center" Name="По центру" Vert="0" Horz="2"/>
      <Node Code="Header" Name="Заголовок" Vert="2" Horz="2"/>
    </Alignments>
    <Approximates>
      <Node Code="Price" Name="Цена (точность 2)" NumCount="2" Divider="0"/>
      <Node Code="Index" Name="Индекс (точность 3)" NumCount="3" Divider="0"/>
    </Approximates>
    <Rows>
      <TableDelimiter State="520" Borders="TableDelimiter">
        <Cell ColSpan="18"/>
      </TableDelimiter>
      <Empty Borders="TableBody">
        <Cell ColSpan="18"/>
      </Empty>
    </Rows>
  </Descript>
  <TopColontitul Name="Верхний колонтитул" BaseData="Name" UserData="" UserState="" BaseState="0">
    <Data>
      <Row>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
      </Row>
      <Row>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
      </Row>
      <Row>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
      </Row>
    </Data>
  </TopColontitul>
  <BottomColontitul BaseData="Numbers" UserData="" Name="Нижний колонтитул" BaseState="0" UserState="">
    <Data>
      <Row>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
      </Row>
      <Row>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
      </Row>
      <Row>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
      </Row>
    </Data>
  </BottomColontitul>
  <Title Name="Титульный лист" BaseState="2" UserState="">
    <Data>
      <Row>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
      </Row>
      <Row>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
      </Row>
      <Row>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
      </Row>
    </Data>
  </Title>
  <Data Class="CcguiReportDataDescript" Name="Структура" BaseState="0" UserState="">
    <Data>
      <Row>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
      </Row>
      <Row>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
      </Row>
      <Row>
        <Cell ColSpan="3" Value="Локальная смета: " BlobState="0" Alignment="Right" Style="DocName"/>
        <Cell ColSpan="11" Alignment="Left" Style="DocName" WrapText="1" Data="SmetaName" BlobState="0" Borders="Subscript"/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
      </Row>
      <Row>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
      </Row>
      <Row>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
      </Row>
      <Row>
        <Cell ColSpan="3" Alignment="Right" Value="архивный номер: " BlobState="0"/>
        <Cell ColSpan="4" Borders="Subscript" Alignment="Center" Data="ArhNumber" BlobState="0"/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
      </Row>
      <Row>
        <Cell ColSpan="3" Alignment="Right" Value="GUID: " BlobState="0"/>
        <Cell ColSpan="4" Alignment="Center" Data="GUID" BlobState="0" Borders="Subscript" Style="SysData"/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
      </Row>
      <Row>
        <Cell ColSpan="3" Alignment="Right" Value="сессия: " BlobState="0"/>
        <Cell ColSpan="4" Borders="Subscript" Alignment="Center" Data="Session" BlobState="0" Style="SysData"/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
      </Row>
      <Row>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
      </Row>
      <Row>
        <Cell ColSpan="6" Alignment="Left" Value="акты выполненных работ:" BlobState="0"/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
        <Cell/>
      </Row>
      <Row>
        <Cell Value="Код строки" BlobState="0" Alignment="Center" Borders="All" WrapText="1" RowSpan="2"/>
        <Cell  BlobState="0" Alignment="Center" Borders="All" WrapText="1" ColSpan="8" Value="Базовый уровень цен"/>
        <Cell Alignment="Center" Borders="All" WrapText="1"  BlobState="0" ColSpan="8" Value="Текущий уровень цен"/>
        <Cell Value="Значение" BlobState="0" Alignment="Center" Borders="All" WrapText="1"  RowSpan="2"/>
      </Row>
      <Row>
        <Cell Value="Прямые затраты" BlobState="0" Alignment="Center" Borders="All" WrapText="1"/>
        <Cell Value="Зарплата осн.раб. " BlobState="0" Alignment="Center" Borders="All" WrapText="1"/>
        <Cell Value="Эксплуатация машин и механизмов " BlobState="0" Alignment="Center" Borders="All" WrapText="1"/>
        <Cell Value="Зарплата мех. " BlobState="0" Alignment="Center" Borders="All" WrapText="1"/>
        <Cell Value="Трудозатраты осн.раб." BlobState="0" Alignment="Center" Borders="All" WrapText="1"/>
        <Cell Value="Трудозатраты мех. " BlobState="0" Alignment="Center" Borders="All" WrapText="1"/>
        <Cell Value="Материалы" BlobState="0" Alignment="Center" Borders="All" WrapText="1"/>
        <Cell Value="Отпускная цена " BlobState="0" Alignment="Center" Borders="All" WrapText="1"/>
        <Cell Value="Прямые затраты " BlobState="0" Alignment="Center" Borders="All" WrapText="1"/>
        <Cell Value="Зарплата осн.раб. " BlobState="0" Alignment="Center" Borders="All" WrapText="1"/>
        <Cell Value="Эксплуатация машин и механизмов " BlobState="0" Alignment="Center" Borders="All" WrapText="1"/>
        <Cell Value="Зарплата мех. " BlobState="0" Alignment="Center" Borders="All" WrapText="1"/>
        <Cell Value="Трудозатраты осн.раб." BlobState="0" Alignment="Center" Borders="All" WrapText="1"/>
        <Cell Value="Трудозатраты мех. " BlobState="0" Alignment="Center" Borders="All" WrapText="1"/>
        <Cell Value="Материалы" BlobState="0" Alignment="Center" Borders="All" WrapText="1"/>
        <Cell Value="Отпускная цена " BlobState="0" Alignment="Center" Borders="All" WrapText="1"/>
      </Row>
      <Row>
        <Cell Value="end_code" BlobState="0" Alignment="Center" Borders="All" WrapText="1" Style="SysData"/>
        <Cell Value="z1b" BlobState="0" Alignment="Center" Borders="All" WrapText="1" Style="SysData"/>
        <Cell Value="z2b" BlobState="0" Alignment="Center" Borders="All" WrapText="1" Style="SysData"/>
        <Cell Value="z3b" BlobState="0" Alignment="Center" Borders="All" WrapText="1" Style="SysData"/>
        <Cell Value="z4b" BlobState="0" Alignment="Center" Borders="All" WrapText="1" Style="SysData"/>
        <Cell Value="z5b" BlobState="0" Alignment="Center" Borders="All" WrapText="1" Style="SysData"/>
        <Cell Value="z6b" BlobState="0" Alignment="Center" Borders="All" WrapText="1" Style="SysData"/>
        <Cell Value="z7b" BlobState="0" Alignment="Center" Borders="All" WrapText="1" Style="SysData"/>
        <Cell Value="z8b" BlobState="0" Alignment="Center" Borders="All" WrapText="1" Style="SysData"/>
        <Cell Value="z1" BlobState="0" Alignment="Center" Borders="All" WrapText="1" Style="SysData"/>
        <Cell Value="z2" BlobState="0" Alignment="Center" Borders="All" WrapText="1" Style="SysData"/>
        <Cell Value="z3" BlobState="0" Alignment="Center" Borders="All" WrapText="1" Style="SysData"/>
        <Cell Alignment="Center" Borders="All" WrapText="1" Value="z4" BlobState="0" Style="SysData"/>
        <Cell Alignment="Center" Borders="All" WrapText="1" Value="z5" BlobState="0" Style="SysData"/>
        <Cell Value="z6" BlobState="0" Alignment="Center" Style="SysData" Borders="All"/>
        <Cell Value="z7" BlobState="0" Alignment="Center" Style="SysData" Borders="All"/>
        <Cell Value="z8" BlobState="0" Alignment="Center" Style="SysData" Borders="All"/>
        <Cell  BlobState="0" Alignment="Center" Borders="All" WrapText="1" Style="SysData" Value="val"/>
      </Row>
      <DataProvider Name="CcSQLReportDataProvider" Query="select case when p.id is not null and p.estim_id is null and p.part_id is null then &apos;Итого по акту №&apos; + act.doc_no + &apos; от &apos; + cast(act.doc_date as varchar) /**/            when p.id is not null and p.estim_id is not null and p.part_id is null then &apos;Итого по смете: &apos; + o.caption  /**/            when p.id is not null and p.estim_id is not null and p.part_id is not null then &apos;Итого по разделу: &apos; + coalesce(part.name, &apos;&apos;)  /**/            else null  /**/       end header_name, /**/       case when p.id is null then 1 else 0 end header_empty, /**/       case when dtl.estim_id is null then -2 else coalesce(part.num, -1) end num, /**/       end_code,  /**/       z1,  /**/       z2,  /**/       z3,  /**/       z4,  /**/       z5,  /**/       z6,  /**/       z7,  /**/       z8,  /**/       z1b,  /**/       z2b,  /**/       z3b,  /**/       z4b,  /**/       z5b,  /**/       z6b,  /**/       z7b,  /**/       z8b,  /**/       val  /**/  from sc_actdetail dtl  /**/  left join sc_act act on act.id = dtl.act_id  /**/  left join sc_actpos part on part.id = dtl.part_id and part.act_id = dtl.act_id and part.estim_id = dtl.estim_id  /**/  left join (select min(id) id, estim_id, part_id from sc_actdetail group by act_id, estim_id, part_id) p on p.id = dtl.id  /**/  left join sc_obj o on o.id = dtl.estim_id  /**/  where act.obj_id = &apos;{:GUID}&apos;  /**/  order by act.period, num, dtl.id  /**/  /**/ /**/">
        <Template Name="DBQuery" Position="CcReportPosition">
          <Data Name="DBQuery">
            <Row HideIf="header_empty = 1     ">
              <Cell  Alignment="Left"  Style="Header" Borders="All" WrapText="1"  BlobState="0" ColSpan="18" Data="header_name"/>
            </Row>
            <Row>
              <Cell Data="end_code" BlobState="0" Borders="All" Alignment="Center"/>
              <Cell Data="z1b" BlobState="0" Borders="All" Alignment="Right" Approximate="Price" IsFloat="1" UseInFormula="1"/>
              <Cell Data="z2b" BlobState="0" Borders="All" Alignment="Right" Approximate="Price" IsFloat="1" UseInFormula="1"/>
              <Cell Data="z3b" BlobState="0" Borders="All" Alignment="Right" Approximate="Price" IsFloat="1" UseInFormula="1"/>
              <Cell Data="z4b" BlobState="0" Borders="All" Alignment="Right" Approximate="Price" IsFloat="1" UseInFormula="1"/>
              <Cell Data="z5b" BlobState="0" Borders="All" Alignment="Right" Approximate="Price" IsFloat="1" UseInFormula="1"/>
              <Cell Data="z6b" BlobState="0" Borders="All" Alignment="Right" Approximate="Price" IsFloat="1" UseInFormula="1"/>
              <Cell Data="z7b" BlobState="0" Borders="All" Alignment="Right" Approximate="Price" IsFloat="1" UseInFormula="1"/>
              <Cell Data="z8b" BlobState="0" Borders="All" Alignment="Right" Approximate="Price" IsFloat="1" UseInFormula="1"/>
              <Cell Data="z1" BlobState="0" Borders="All" Alignment="Right" Approximate="Price" IsFloat="1" UseInFormula="1"/>
              <Cell Data="z2" BlobState="0" Borders="All" Alignment="Right" Approximate="Price" IsFloat="1" UseInFormula="1"/>
              <Cell Data="z3" BlobState="0" Borders="All" Alignment="Right" Approximate="Price" IsFloat="1" UseInFormula="1"/>
              <Cell Data="z4" BlobState="0" Borders="All" Alignment="Right" Approximate="Price" IsFloat="1" UseInFormula="1"/>
              <Cell Data="z5" BlobState="0" Borders="All" Alignment="Right" Approximate="Price" IsFloat="1" UseInFormula="1"/>
              <Cell Data="z6" BlobState="0" Borders="All" Alignment="Right" Approximate="Price" IsFloat="1" UseInFormula="1"/>
              <Cell Data="z7" BlobState="0" Borders="All" Alignment="Right" Approximate="Price" IsFloat="1" UseInFormula="1"/>
              <Cell Data="z8" BlobState="0" Borders="All" Alignment="Right" Approximate="Price" IsFloat="1" UseInFormula="1"/>
              <Cell  BlobState="0" Borders="All" Alignment="Center"  Data="val" Approximate="Price" IsFloat="1" UseInFormula="1"/>
            </Row>
          </Data>
        </Template>
      </DataProvider>
    </Data>
  </Data>
</Root>
